<?php

namespace App\Http\Controllers\Brand;

use App\Http\Controllers\BaseController;
use App\Models\BrandLocation;
use Illuminate\Http\Request;

class LocationController extends BaseController
{
    public function index(Request $request)
    {
        $params = $this->validate($request,[
            'firm_profession_id' =>  'required|integer'
        ]);

        $data = BrandLocation::query()
                    ->where($params)->where('status',1)
                    ->orderBy('sort')
                    ->orderByDesc('id')
                     ->get();

        return $this->success($data);
    }
}
